﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace GDF_kaart_inlezen
{
    class Kaart: Canvas
    {
        Reader r;
        public Kaart()
        {
            r = new Reader();
            r.Read();
        }
        protected override void OnRender(DrawingContext dc)
        {
            base.OnRender(dc);
            
            //dc.PushTransform(new TranslateTransform(-50000000, -50000000));
            //dc.PushTransform(new ScaleTransform(0.0000000001, 0.0000000001));
            foreach(Data d in r.dataList)
            {
                dc.DrawEllipse(Brushes.Black, new Pen(), new Point(((d.y - 51900000) / 2000), 500 - ((d.x - 516000000) / 2000)), 1, 1);
            }
        }

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);
        }
    }
}
